package com.tianhao.luo;

import com.tianhao.luo.use.OffNovelBook;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: BookStore
 * @Description: 书店
 * @author: tianhao.luo@hand-china.com
 * @date: 2020/7/14  17:43
 */
public class BookStore {
    private final static List<IBook> bookList = new ArrayList<IBook>();

    //静态代码块初始化数据，实际项目中一般是由持久层完成
    static {
        bookList.add(new NovelBook("天龙八部", 3200, "金庸"));
        bookList.add(new NovelBook("巴黎圣母院", 5600, "雨果"));
        bookList.add(new NovelBook("悲惨世界", 3500, "雨果"));
        bookList.add(new NovelBook("金瓶梅", 4300, "兰陵笑笑生"));
//        bookList.add(new OffNovelBook("天龙八部",3200,"金庸"));
//        bookList.add(new OffNovelBook("巴黎圣母院",5600,"雨果"));
//        bookList.add(new OffNovelBook("悲惨世界",3500,"雨果"));
//        bookList.add(new OffNovelBook("金瓶梅",4300,"兰陵笑笑生"));
    }

    public static List<IBook> getBookList() {
        return bookList;
    }
}
